<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules/vue/dist/vue.min.js"></script>
</head>
<body>
    <div id="app">
        app
        <hr>
        hello {{school}}
        <hr>
        <h1>汽车租赁管理系统</h1>
        <p>
            登录账号：<input type="text" v-model="username"> - {{username}}
        </p>
        <p>
            登录密码：<input type="password" v-model="password"> - {{password}}
        </p>
        <p>
            <button @click="onLogin()">登录</button>
        </p>
        <p>
            <button @click="onParams(9888)">提交参数</button>
        </p>
    </div>
    <script>
        const app = new Vue({
            el:"#app",
            data:{
                school:"工大",
                username:"",
                password:""
            },
            methods:{
                onLogin(){
                    console.log("clicked login btn!");
                    console.log("账号是："+this.username);
                    console.log("密码是："+this.password);
                },
                onParams(param){
                    console.log(param)
                }

            }
        })
    </script>
</body>
</html>